package com.liaoye.hellocustomview.view;

import android.content.Context;
import android.util.AttributeSet;

import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatTextView;

import com.liaoye.hellocustomview.model.Point;

public class BallTextView extends AppCompatTextView {
    public BallTextView(Context context) {
        super(context);
    }

    public BallTextView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
    }

    public BallTextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    /**
     * 添加方法重新布局
     * @param point
     */
    public void setFallingPoint(Point point) {
        layout(point.x, point.y, point.x + getWidth(), point.y + getHeight());
    }
}
